package com.yu.designpatterns.strategy;

import java.util.Arrays;

public class Main {

    public static void main(String[] args) {

        Cat[] arr = {new Cat(1,1),new Cat(3,3),new Cat(5,5)};
        Dog[] dogs = {new Dog(1),new Dog(3),new Dog(5)};
        Sorter<Cat> sorter = new Sorter<Cat>();
        sorter.sort(arr,new CatComparatorHeight());
//        sorter.sort(arr,new CatComparatorWeight());
//        sorter.sort(dogs,new DogComparator());
        System.out.println(Arrays.toString(arr));

    }

}
